<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>loader.js</title>
</head>
<body>
    <div class="load_num"></div>
</body>
<script src="https://www.changyou.com/cdn/zepto/1.2.0/zepto.js"></script>
<script src="./loader.min.js"></script>
<script>
    var source = [
        './img/pint1.png',
        './img/pint2.png',
        './img/pint3.png',
        './img/pint4.png',
        './img/pint5.png',
        './img/pint6.png',
        './img/pint7.png'
    ];
    new mo.Loader(source, {
        loadType: 1,
        minTime: 20,
        onLoading: function (count, total) {
            var num = parseInt(count / total * 100) + '%';
            $('.load_num').text(num);
        },
        onComplete: function (time) {
            console.log("总计时长为：" + time + "ms");
        }
    });
</script>
</html>